package com.iwhalecloud.bss.kite.cucc.client.api.batch;

import com.github.pagehelper.PageInfo;
import com.iwhalecloud.bss.kite.client.dto.DataResult;
import com.iwhalecloud.bss.kite.cucc.client.dto.batch.KiteBatchConfig;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.List;
import java.util.Map;

public interface IBatchConfigService {

    PageInfo<KiteBatchConfig> queryKiteBatchConfig(Map<String, Object> query);

    DataResult<String> updateKiteBatchConfig(KiteBatchConfig kiteBatchConfig);

    DataResult<String> saveKiteBatchConfig(KiteBatchConfig kiteBatchConfig);

    DataResult<Map<String, Object>> batchImport(InputStream inputStream, InputStream fileUploadStream, boolean isXls, String fileName, String goodsSku) throws Exception;

    List<KiteBatchConfig> queryKiteBatchConfigForList(Map<String, Object> query);

    List<Map<String, Object>> getProdAttr(String goodsSku);

    KiteBatchConfig queryConfigByOfferId(String applyRegionCode,String cateId, String offerId, String fileName);

    void checkTmplFileName(KiteBatchConfig kiteBatchConfig);

    void downloadTemplate(OutputStream outputStream, String objectName, String offerId) throws IOException;

    void exportExcel(OutputStream outputStream, KiteBatchConfig kiteBatchConfig) throws IOException;

    void previewTemplate(OutputStream outputStream, KiteBatchConfig kiteBatchConfig) throws IOException;

    DataResult<String> deleteKiteBatchConfig(String configId);
}
